home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1996-02-22 | 917 b | 29 lines | [TEXT/3PRM] |
- implementation module fonts;
-
- import mac_types;
-
- GetFontName :: !Int !{#Char} !Toolbox -> (!{#Char},!Toolbox);
- GetFontName fontNum string256 tb = (GetFontName1 fontNum string256 tb, NewToolbox);
-
- GetFontName1 :: !Int !{#Char} !Toolbox -> {#Char};
- GetFontName1 fontNum string256 t = code (fontNum=W,string256=A0,t=U)(theName=A0){
- instruction 0x2808 || move.l a0,d4
- instruction 0x42A8 0x0004 || clr.l 4(a0)
- instruction 0x4868 0x0007 || pea 7(a0)
- instruction 0xA8FF
- instruction 0x2044 || move.l d4,a0
- };
-
- GetFNum :: !{#Char} !Toolbox -> (!Int,!Toolbox);
- GetFNum fontName t = code (fontName=R2S,t=O4U)(theNum=W,z=Z){
- instruction 0xA900
- };
-
- RealFont :: !Int !Int !Toolbox -> (!Bool,!Toolbox);
- RealFont fontNum size t = code (fontNum=R2W,size=W,t=U)(is_real_font=D1,z=Z){
- instruction 0xA902
- instruction 0x7000 || moveq #0,d0
- instruction 0x101F || move.b (sp)+,d0
- instruction 0x2200 || move.l d0,d1
- };
-